package com.sgam.mf.domain.entity;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.codehaus.jackson.map.annotate.JsonDeserialize;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.springframework.format.annotation.DateTimeFormat;

import com.sgam.mf.domain.ref.RefActivityType;
import com.sgam.mf.domain.ref.RefLivePlace;
import com.sgam.utils.CustomDateDeserializer;
import com.sgam.utils.CustomDateSerializer;

@Entity
@Table(name = "APPLICATION_PERS_FIZ")
public class ApplicationPersFiz {


	@Id
	@Column(name = "id")
	@GeneratedValue
	private Integer id;

//	@ManyToOne
//	@JoinColumn(name = "contract_fk", nullable = true) 
//	private Contracts contracts;
	
	@Column(name = "idnp") 
	private String idnp;
	
	@Column(name = "name_surname") 
	private String nameSurname;
	
	@Column(name = "phone") 
	private String phone;
	
	@Column(name = "status") 
	private Integer status;
	
	@Column(name = "updated_by_fk", nullable = true) 
	private Integer updatedByFk;
	
	@JsonSerialize(using = CustomDateSerializer.class)
	@JsonDeserialize(using = CustomDateDeserializer.class)
	@DateTimeFormat(pattern="dd.MM.yyyy")
	@Column(name = "updated_date", nullable = true) 
	private Date updatedDate;
	
	
	@ManyToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "reg_persons_fk") 
	private RegPersons regPersons;

//	@Column(name = "ref_live_place_fk") 
//	private Integer refLivePlaceFk;
	
	@ManyToOne
	@JoinColumn(name = "ref_live_place_fk") 
	private RefLivePlace refLivePlace;
	
	@Column(name = "work_place") 
	private String workPlace;
	
	@Column(name = "function") 
	private String function;
	
	@Column(name = "experience") 
	private String experience;

	@Column(name = "ref_propery_type_fk") 
	private Integer refProperyTypeFk;
	
	@Column(name = "gaj_flg") 
	private Integer gajFlg;
	
	@Column(name = "martial_status") 
	private Integer martialStatus;

	@Column(name = "salary") 
	private String salary;
	
	@Column(name = "pension") 
	private String pension;
	
	@Column(name = "arenda") 
	private String arenda;
	
	@Column(name = "transfer") 
	private String transfer;
	
	@Column(name = "husband_revenue") 
	private String husbandRevenue;

	@Column(name = "another_revenue") 
	private String anotherRevenue;
	
	@Column(name = "famaly_epence") 
	private String famalyEpence;
	
	@Column(name = "rent_expence") 
	private String rentExpence;
	
	@Column(name = "another_expence") 
	private String anotherExpence;

	@Column(name = "credit_history_flg") 
	private Integer creditHistoryFlg;
	
	@Column(name = "positive_hostory_flg") 
	private Integer positiveHostoryFlg;
	
	@Column(name = "garant_person_flg") 
	private Integer garantPersonFlg;
	
	@Column(name = "credit_amount") 
	private String creditAmount;
	
	@Column(name = "credit_time") 
	private String creditTime;
	
	@Column(name = "credit_destination") 
	private String creditDestination;
	
	@Column(name = "aboard_grad_rud") 
	private String aboardGradRud;
	
	@Column(name = "aboard_tara") 
	private String aboardTara;
	
	@Column(name = "aboard_vechime") 
	private String aboardVechime;
	
	@Column(name = "aboard_legal") 
	private Integer aboardLegal;
	
	@Column(name = "another_info") 
	private String anotherInfo;
	
//	@Column(name = "husband_age") 
//	private String husbandAge; 
	
	@JsonSerialize(using = CustomDateSerializer.class)
	@JsonDeserialize(using = CustomDateDeserializer.class)
	@DateTimeFormat(pattern="dd.MM.yyyy")
	@Column(name = "husband_age", nullable = true) 
	private Date husbandAge;
	
	@Column(name = "children") 
	private Integer children;
	
	@Column(name = "children_age") 
	private String childrenAge;
	
	@ManyToOne
	@JoinColumn(name = "ref_activity_type_fk") 
	private RefActivityType refActivityType;
	
	@Column(name = "gaj") 
	private String gaj;
	
	
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

//	public Contracts getContracts() {
//		return contracts;
//	}
//
//	public void setContracts(Contracts contracts) {
//		this.contracts = contracts;
//	}

	public String getIdnp() {
		return idnp;
	}

	public void setIdnp(String idnp) {
		this.idnp = idnp;
	}

	public String getNameSurname() {
		return nameSurname;
	}

	public void setNameSurname(String nameSurname) {
		this.nameSurname = nameSurname;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getUpdatedByFk() {
		return updatedByFk;
	}

	public void setUpdatedByFk(Integer updatedByFk) {
		this.updatedByFk = updatedByFk;
	}

	public Date getUpdatedDate() {
		return updatedDate;
	}

	public void setUpdatedDate(Date updatedDate) {
		this.updatedDate = updatedDate;
	}

	public RegPersons getRegPersons() {
		return regPersons;
	}

	public void setRegPersons(RegPersons regPersons) {
		this.regPersons = regPersons;
	}

//	public Integer getRefLivePlaceFk() {
//		return refLivePlaceFk;
//	}
//
//	public void setRefLivePlaceFk(Integer refLivePlaceFk) {
//		this.refLivePlaceFk = refLivePlaceFk;
//	}

	
	public RefLivePlace getRefLivePlace() {
		return refLivePlace;
	}

	public void setRefLivePlace(RefLivePlace refLivePlace) {
		this.refLivePlace = refLivePlace;
	}

	
	public String getWorkPlace() {
		return workPlace;
	}

	public void setWorkPlace(String workPlace) {
		this.workPlace = workPlace;
	}

	public String getFunction() {
		return function;
	}

	public void setFunction(String function) {
		this.function = function;
	}

	public String getExperience() {
		return experience;
	}

	public void setExperience(String experience) {
		this.experience = experience;
	}

	public Integer getRefProperyTypeFk() {
		return refProperyTypeFk;
	}

	public void setRefProperyTypeFk(Integer refProperyTypeFk) {
		this.refProperyTypeFk = refProperyTypeFk;
	}

	public Integer getGajFlg() {
		return gajFlg;
	}

	public void setGajFlg(Integer gajFlg) {
		this.gajFlg = gajFlg;
	}

	public Integer getMartialStatus() {
		return martialStatus;
	}

	public void setMartialStatus(Integer martialStatus) {
		this.martialStatus = martialStatus;
	}

	public String getSalary() {
		return salary;
	}

	public void setSalary(String salary) {
		this.salary = salary;
	}

	public String getPension() {
		return pension;
	}

	public void setPension(String pension) {
		this.pension = pension;
	}

	public String getArenda() {
		return arenda;
	}

	public void setArenda(String arenda) {
		this.arenda = arenda;
	}

	public String getTransfer() {
		return transfer;
	}

	public void setTransfer(String transfer) {
		this.transfer = transfer;
	}

	public String getHusbandRevenue() {
		return husbandRevenue;
	}

	public void setHusbandRevenue(String husbandRevenue) {
		this.husbandRevenue = husbandRevenue;
	}

	public String getAnotherRevenue() {
		return anotherRevenue;
	}

	public void setAnotherRevenue(String anotherRevenue) {
		this.anotherRevenue = anotherRevenue;
	}

	public String getFamalyEpence() {
		return famalyEpence;
	}

	public void setFamalyEpence(String famalyEpence) {
		this.famalyEpence = famalyEpence;
	}

	public String getRentExpence() {
		return rentExpence;
	}

	public void setRentExpence(String rentExpence) {
		this.rentExpence = rentExpence;
	}

	public String getAnotherExpence() {
		return anotherExpence;
	}

	public void setAnotherExpence(String anotherExpence) {
		this.anotherExpence = anotherExpence;
	}

	public Integer getCreditHistoryFlg() {
		return creditHistoryFlg;
	}

	public void setCreditHistoryFlg(Integer creditHistoryFlg) {
		this.creditHistoryFlg = creditHistoryFlg;
	}

	public Integer getPositiveHostoryFlg() {
		return positiveHostoryFlg;
	}

	public void setPositiveHostoryFlg(Integer positiveHostoryFlg) {
		this.positiveHostoryFlg = positiveHostoryFlg;
	}

	public Integer getGarantPersonFlg() {
		return garantPersonFlg;
	}

	public void setGarantPersonFlg(Integer garantPersonFlg) {
		this.garantPersonFlg = garantPersonFlg;
	}

	public String getCreditAmount() {
		return creditAmount;
	}

	public void setCreditAmount(String creditAmount) {
		this.creditAmount = creditAmount;
	}

	public String getCreditTime() {
		return creditTime;
	}

	public void setCreditTime(String creditTime) {
		this.creditTime = creditTime;
	}

	public String getCreditDestination() {
		return creditDestination;
	}

	public void setCreditDestination(String creditDestination) {
		this.creditDestination = creditDestination;
	}

	public String getAboardGradRud() {
		return aboardGradRud;
	}

	public void setAboardGradRud(String aboardGradRud) {
		this.aboardGradRud = aboardGradRud;
	}

	public String getAboardTara() {
		return aboardTara;
	}

	public void setAboardTara(String aboardTara) {
		this.aboardTara = aboardTara;
	}

	public String getAboardVechime() {
		return aboardVechime;
	}

	public void setAboardVechime(String aboardVechime) {
		this.aboardVechime = aboardVechime;
	}

	public Integer getAboardLegal() {
		return aboardLegal;
	}

	public void setAboardLegal(Integer aboardLegal) {
		this.aboardLegal = aboardLegal;
	}

	public String getAnotherInfo() {
		return anotherInfo;
	}

	public void setAnotherInfo(String anotherInfo) {
		this.anotherInfo = anotherInfo;
	}

//	public String getHusbandAge() {
//		return husbandAge;
//	}
//
//	public void setHusbandAge(String husbandAge) {
//		this.husbandAge = husbandAge;
//	}
	
	public Date getHusbandAge() {
		return husbandAge;
	}

	public void setHusbandAge(Date husbandAge) {
		this.husbandAge = husbandAge;
	}

	public Integer getChildren() {
		return children;
	}


	public void setChildren(Integer children) {
		this.children = children;
	}

	public String getChildrenAge() {
		return childrenAge;
	}

	public void setChildrenAge(String childrenAge) {
		this.childrenAge = childrenAge;
	}

	public RefActivityType getRefActivityType() {
		return refActivityType;
	}

	public void setRefActivityType(RefActivityType refActivityType) {
		this.refActivityType = refActivityType;
	}

	public String getGaj() {
		return gaj;
	}

	public void setGaj(String gaj) {
		this.gaj = gaj;
	}


	
	
	
}


 

